<?php
declare (strict_types=1);

namespace app\command;



use app\common\model\Service;
use think\console\Command;
use think\console\Input;
use think\console\Output;



class TopExpire extends Command
{
    protected function configure()
    {

        $this->setName('topexpire')->setDescription('TopExpire');
    }

    protected function execute(Input $input, Output $output)
    {
        $daziModel = new \app\common\model\Dazi();
        $daziList = $daziModel->where(['status' => 2,'is_top'=> 1])->where('top_expire_time', '<', time())->update(['is_top' => 0]);
        $serviceModel = new Service();
        $serviceModel = $daziModel->where(['status' => 2,'is_top'=> 1])->where('top_expire_time', '<', time())->update(['is_top' => 0]);
      //  $UserCommissionModel = new UserCommission();


    }

    /**
     * execute()方法 就是 运行该命令行类的时候要执行的具体业务逻辑代码
     */

}